﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SceneFrame
{
    public class FilterTriggerLarger : IFilter
    {
        public string Key { get; set; }

        public int MinCount { get; set; }

        public override bool Filter(Trigger trigger)
        {
            var count = trigger.GetData(Key);
            if (string.IsNullOrEmpty(count))
                return false;

            return int.TryParse(count, out int icount) && icount >= MinCount;
        }
    }
}
